import { PageContainer } from '@ant-design/pro-components';
import { useState } from 'react';
import ReactQuill from 'react-quill';
import 'react-quill/dist/quill.snow.css';

const Index: React.FC = () => {
  const [value, setValue] = useState('');

  return (
    <PageContainer
      ghost
      header={{
        title: '富文本编辑器',
      }}
    >
      富文本编辑器
      <ReactQuill theme="snow" value={value} onChange={setValue} />
      {/* <div dangerouslySetInnerHTML={{ __html: value }} /> */}
      <span>{value}</span>
    </PageContainer>
  );
};

export default Index;
